<%--
  Created by IntelliJ IDEA.
  User: 29047
  Date: 2017/12/26
  Time: 11:07
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" %>
<html>
<head>
    <title>Test</title>
</head>
<body>

    <form id="adminTest" action="/admin/list" method="post">
        <input type="submit" value="提交">
    </form>
    <form id="newdel" action="/news/delete" method="post">
        输入要删除新闻的id:<input type="text" name="newsId">
        <input type="submit" value="提交">
    </form>

    <form id="news" action="/file/add" method="post" enctype="multipart/form-data">
        输入新增文件的详细信息:<input type="text" name="newfile">
        <p>
            选择文件:<input type="file" name="file" >
        <p>
        <input type="submit" value="提交">
    </form>

    <form id="new_test" action="/news/firstfive" method="post">
        <input type="submit" value="嘀嘀嘀">
    </form>

    <form id="admin" action="/admin/add" method="post">
      测试注册admin  <input type="text" name="admin">

            <input type="submit" value="提交">
    </form>

    <form id="admin_login" action="/admin/login" method="post">
        测试登录admin  <input type="text" name="admin_login">

        <input type="submit" value="提交">
    </form>
    <%--<input type="text" name="admin_user_name" id="a1"> <br>--%>
    <%--<input type="text" name="admin_password" id="a2"> <br>--%>

    <%--<form id="form1" onsubmit="return false" action="#" method="post">--%>
        <%--<input type="hidden" name="admin_login" value="123321" id="a3"> <br>--%>
        <%--<input type="submit" onclick="login()">--%>
    <%--</form>--%>
    <%--<!-- &lt;%&ndash;<button id="b1">测试</button>&ndash;%&gt; -->--%>
    <%--<script src="http://code.jquery.com/jquery-latest.js--%>

 <%--"></script>--%>
    <%--<script>--%>

        <%--function login() {--%>
<%--//    var sss="admin_login:{admin_user_name:\"管理员1\",\"admin_password\":\"123456\"}"--%>
<%--//    alert(sss);--%>
            <%--var t1=document.getElementById("a1").value;--%>
            <%--var t2=document.getElementById("a2").value;--%>
            <%--// var t3=document.getElementById("a3");--%>
            <%--// t3.value="{admin_user_name:\""+t1+"\",admin_password:\""+t2+"\"}";--%>
            <%--// alert(t3.value);--%>
            <%--var t3 = ":{admin_user_name:\""+t1+"\",admin_password:\""+t2+"\"}";--%>
            <%--$.ajax({--%>
                <%--type:"post",--%>
                <%--url:"/admin/login",--%>
<%--//                headers : {'Access-Control-Allow-Origin':'*'},--%>
<%--//                contentType:"application/x-www-form-urlencoded; charset=utf-8",--%>
<%--//                async: true,--%>
                <%--// data:{--%>
                <%--//   // "admin_login":{--%>
                <%--//     "adsads":"sadasd",--%>
                <%--//     "sadsa":"sadasd"--%>
                <%--//   // }--%>
                <%--// },--%>
                <%--// data:"{admin_user_name:'"+t1+"',admin_password:'"+t2+"'}",--%>
                <%--data:"admin_login="+"{admin_user_name:'"+t1+"',admin_password:'"+t2+"'}",--%>
                <%--// $('#form1').serialize(),--%>
                <%--dataType:"json",--%>
                <%--success:function(data){--%>
                <%--console.log(data);--%>
                <%--alert(data)--%>
                <%--alert("测试");--%>
            <%--},--%>
            <%--error: function (XMLHttpRequest, textStatus, errorThrown) {--%>
                <%--// $("#p_test").innerHTML = "there is something wrong!";--%>
                <%--alert(XMLHttpRequest.status);--%>
                <%--alert(XMLHttpRequest.readyState);--%>
                <%--alert(textStatus);--%>
            <%--}--%>
        <%--});--%>
        <%--}--%>



    <%--</script>--%>

</body>
</html>
